<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition> 
	<p:growl id="notificationGrowl" showDetail="true" sticky="true"/>
	<p:panelGrid style="margin:auto;width:600px;" rendered="#{organizationalGoalCRUDBoundary.render_goal}">  
	    <f:facet name="header">
	    	<p:row>  
	   			<p:column colspan="4">
	   				<h:outputLabel value="#{organizationalGoalCRUDBoundary.displayed_goal.title}"/>	
	   			</p:column>
	   		</p:row>	
	    </f:facet>
	    
	    <p:row>
	    	<p:column colspan="1" style="width:10%;">
	    		<h:outputLabel value="Title *" style="color:red;"/>
	    	</p:column>
	    	<p:column colspan="3" style="width:90%;">
	    		<p:inputText value="#{organizationalGoalCRUDBoundary.displayed_goal.title}" label="Title" style="width:98%" required="true"/> 				
	    	</p:column>		
	    </p:row>
	    
	    <p:row>
	    	<p:column colspan="1" style="width:10%;">
	    		<h:outputLabel value="Status:" />  																
	    	</p:column>
	    	<p:column colspan="3" style="width:90%;">
	    		<h:outputLabel value="#{organizationalGoalCRUDBoundary.displayed_goal.status}" />  																
	    	</p:column>		
	    </p:row>
	    
	    <p:row>
	    	<p:column colspan="1" style="width:10%;">
	    		<h:outputLabel value="Focus" />
	    	</p:column>	
	    	<p:column colspan="1" style="width:40%">
	    		<p:inputText value="#{organizationalGoalCRUDBoundary.displayed_goal.focus}" label="Focus" style="width:90%"/> 								
	    	</p:column>	
	    	<p:column colspan="1" style="width:10%">
	    		<h:outputLabel value="Object" />  																
	    	</p:column>	
	   		<p:column colspan="1" style="width:40%">
	   			<p:inputText value="#{organizationalGoalCRUDBoundary.displayed_goal.object}" required="false" label="Object" style="width:90%"/>				
	   		</p:column>	
	    </p:row>
	    
	 	<p:row>
	 	 	<p:column colspan="1" style="width:10%;">
	 	 		<h:outputLabel value="Magnitude" />  																
	 	 	</p:column>	
	   	 	<p:column colspan="1" style="width:40%;">
	   	 		<p:inputText value="#{organizationalGoalCRUDBoundary.displayed_goal.magnitude}" required="false" label="Magnitude" style="width:90%"/>			
	   	 	</p:column>		    
	    	<p:column colspan="1" style="width:10%;">
	    		<h:outputLabel value="Timeframe" />  																
	    	</p:column>	
	    	<p:column colspan="1" style="width:40%;">
	    		<p:inputText value="#{organizationalGoalCRUDBoundary.displayed_goal.timeframe}" required="false" label="Object" style="width:90%"/>			
	    	</p:column>	
	 	</p:row>

	   	<p:row>
	   		<p:column colspan="1" style="width:10%;">
	   			<h:outputLabel value="Organizational Scope" />  													
	   		</p:column>
	    	<p:column colspan="1" style="width:40%;">
	    		<p:inputText value="#{organizationalGoalCRUDBoundary.displayed_goal.organizationalScope}" required="false" label="Object" style="width:90%"/>	
	    	</p:column>
	    	<p:column colspan="1" style="width:10%;">
	    		<h:outputLabel value="Constrains"/>																
	    	</p:column>
	    	<p:column colspan="1" style="width:40%;">
	    		<p:inputText value="#{organizationalGoalCRUDBoundary.displayed_goal.constraints}" required="false" label="Constrains" style="width:90%"/>		
	    	</p:column>
	   	</p:row>
	    
	    <p:row>
	    	<p:column colspan="1" style="width:10%;">
	    		<h:outputLabel  style="align:center" value="Description" />    					
	    	</p:column>
	    	<p:column colspan="3" style="width:80%;">
	    		<p:editor width="550" height="200" style="align:center" 
	    			      controls="bold italic underline style  size color highlight bullets numbering alignleft center alignright " 
	    		          value="#{organizationalGoalCRUDBoundary.displayed_goal.description}"/>
	    	</p:column> 
	    </p:row>
	 	
	 	<p:row>
	 		<p:column colspan="1" style="width:10%;">
	 			<h:outputLabel  style="align:center" value="GoalEnactor" />    					
	 		</p:column>
	 		<p:column colspan="3" style="width:90%;">
	 	 		<p:selectOneListbox style="width:550px;height:20px;" >
	 	 			<f:selectItem itemLabel="	#{organizationalGoalCRUDBoundary.displayed_goal.goalEnactor.DTO.username}- 
	 	 									 	#{organizationalGoalCRUDBoundary.displayed_goal.goalEnactor.DTO.firstname} - 
	 	 										#{organizationalGoalCRUDBoundary.displayed_goal.goalEnactor.DTO.lastname} - 
	 	 										#{organizationalGoalCRUDBoundary.displayed_goal.goalEnactor.DTO.username}" 
	 	 						  itemValue="#{activityGOBoundary.goalEnactor.id.toString()}" />
       			</p:selectOneListbox>
       			<br/> 
       			<p:commandButton value="edit" icon="ui-icon-pencil" onclick="editEnactorDlg.show()" />
	 		</p:column>
	 	</p:row>
	 	
	 	<p:row>
	 		<p:column colspan="1" style="width:10%;">
	 			<h:outputLabel  style="align:center" value="SuperList" />    					
	 		</p:column>
	 		<p:column colspan="3" style="width:90%;">
	 	 		<p:selectOneListbox style="width:550px;height:100px" var="u" >  
					<f:selectItems value="#{organizationalGoalCRUDBoundary.displayed_goal.superList}" var="user" 
					               itemLabel="#{user.username} - 
					                          #{user.firstName} - 
					                          #{user.lastName} - 
					                          #{user.role.title}" 
					               itemValue="#{user.id.toString()}"/>
       			</p:selectOneListbox>
       			<br/>
       			<p:commandButton value="edit" icon="ui-icon-pencil" onclick="editSuperDlg.show()" />
	 		</p:column>
	 	</p:row>
  			<p:row>
	    	<p:column colspan="1" style="width:10%;">
	    		<h:outputLabel  style="align:center" value="Relations" />    					
	    	</p:column>
	    	<p:column colspan="3" style="width:80%;">
	    		<p:editor width="550" height="200" style="align:center" 
	    			      controls="bold italic underline style  size color highlight bullets numbering alignleft center alignright " 
	    		          value="#{organizationalGoalCRUDBoundary.displayed_goal.relations}"/>
	    	</p:column> 
	    </p:row>
	</p:panelGrid>	
</ui:composition>
</html>